import cn.jja8.networkTransmission.tool.ByteDataTransmission;

import java.io.*;
import java.net.ServerSocket;
import java.net.Socket;
import java.nio.charset.StandardCharsets;

class sss{
    public static void main(String[] args) {
        try {
            ServerSocket serverSocket = new ServerSocket(2666);
            Socket c = serverSocket.accept();
            InputStream i = c.getInputStream();
            while (true){
                byte[] b = ByteDataTransmission.接收(i);
                System.out.println(b.length);
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
class qqq{
    public static void main(String[] args) {
        try {
            Socket socket = new Socket("127.0.0.1",2777);
            OutputStream o = socket.getOutputStream();
            ByteDataTransmission.发送(o,new byte[99999]);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
